package com.yun.dz.model;
import com.yun.dz.bean.UserBean;
import com.yun.dz.dao.DBProvider;
import org.apache.commons.dbutils.handlers.BeanListHandler;
import org.apache.commons.dbutils.handlers.MapListHandler;

import java.util.List;
import java.util.Map;

public class UserLoginModal {


    public boolean isLogined(UserBean userB) {
        boolean isOK = false;
        String strSql = "SELECT * FROM one WHERE userName = ? AND userPsw = ? ";
        List<UserBean> list = DBProvider.query(strSql, new BeanListHandler<>(UserBean.class), userB.getUserName(), userB.getUserPsw());
        if (list != null && list.size() > 0) {
            isOK = true;
        }
        return isOK;

    }
}